package com.myself.aop.controller;

import com.myself.aop.anno.Log;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by SiFeiYang on Date 2022/4/2
 */
@RestController
public class AopTestController {

    @Log(name = "aoptest1")
    @GetMapping("/sfy/aoptest/aoptest1")
    public String aopTest1(){
        return "=========aoptest1===========";
    }
    @Log(name = "aoptest2")
    @GetMapping("/sfy/aoptest/aoptest2")
    public String aopTest2(){
        int i = 1/0;
        return "========aoptest2=========";
    }
    @Log(name = "aoptest3")
    @GetMapping("/sfy/aoptest/aoptest3")
    public String aopTest3(){
        return "========aoptest3=======";
    }
    @GetMapping("/sfy/aoptest/aoptest4")
    public String aopTest4(){
        return "==========aoptest4=========";
    }
}
